home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / FREENET / DEVOS / TIMER.ZIP / !ReadMe1st next >
Text File  |  1996-01-12  |  2KB  |  58 lines

  1. SetTimer
  2. --------
  3.  
  4. Syntax: *SetTimer <varname>
  5.  
  6. Create a timer in the given system variable. Every time the variable is read,
  7. it will produce a string representing the time since the variable was
  8. created. The timer resolution is in centiseconds and it will run correctly
  9. for 200 years (or the next machine reboot).
  10.  
  11. One example of the use of SetTimer is the implementation of an 'UpTime'
  12. command. Like on Unix systems, UpTime will show the time since the last
  13. system start.
  14.  
  15.   SetTimer Sys$UpTime
  16.   SetMacro Alias$UpTime Echo <Sys$UpTime>
  17.  
  18.  
  19. UnsetCV
  20. -------
  21.  
  22. Syntax: *UnsetCV <varname>
  23.  
  24. The normal *Unset command will delete a system variable, this does however
  25. not work for code variables like the ones SetTimer produces. This utility
  26. will delete code variables as well. The given variable name may be wildcarded
  27. with * or # chars to remove a set of variables, ie. *UnsetCV Timer*
  28.  
  29. These tools are related to FreeDial since I wrote them to generate the Dial
  30. Logfiles people requested. The following examples show how you can use these
  31. tools in the FreeDial script files:
  32.  
  33. Add this to the end of the script file from which you want to log on line
  34. time. The script will not reach these commands when the connection fails. The
  35. next version of FreeDial will probably export Inet$ProviderPhoneNumber as
  36. well so you can include that too.
  37.  
  38.   *Echo Online at <Sys$Date> <Sys$Time> { >> <FreeUser$Dir>.DialLog }
  39.   *SetTimer Inet$OnlineTime
  40.  
  41. Add this to FreeNet's ShutDown Obey file which ends the connection:
  42.  
  43.   Echo Offline at <Sys$Date> <Sys$Time> after <Inet$OnlineTime> { >> <FreeUser$Dir>.DialLog }
  44.   UnsetCV Inet$OnlineTime
  45.  
  46. The SetTimer and UnsetCV utilities must of course be placed in a directory on
  47. your Run$Path like $.Library for this to work.
  48.  
  49. SetTimer, UnsetCV and their source code files are public domain, use it for
  50. whatever you like.
  51.  
  52. Gert-Jan de Vos, 11 Jan 1996
  53. Benedenbeekloop 18
  54. 5662 HL Geldrop
  55. the Netherlands
  56. +31 40 2858590
  57. devos@eb.ele.tue.nl
  58.